import request from '@/utils/request'


export function getTopicList(params){
    return request({
        url : '/topic/list',
        method : 'get',
        params
    })
}


export function getTopicDetail(id){
    return request({
        url : '/topic/' + id,
        method : 'get'
    })
}


export function delTopic(id){
    return request({
        url : '/topic/del/' + id,
        method : 'post',
    })
}


export function editTopic(data){
    return request({
        url : '/topic/edit',
        method : 'post',
        data
    })
}

export default {
    getTopicList,
    getTopicDetail,
    editTopic,
    delTopic
};